import React, { Component } from 'react';
import logo from './logo.svg'; 
import Dialog from './dialog/'; 
import './App.css';
class App extends Component {
    myalert = () => {
        var d = Dialog({
            title: '提示',
            content: '按钮回调函数返回1则不许关闭',
            okValue: '确定',
            ok: function() {
                this.title('提交中…');
                return false;
            },
            cancelValue: '取消',
            cancel: function() {}
        });
        console.log(d); 
        d.show();
    }
    render() {
        return (
            <div className="App">
              <header className="App-header">
                <img src={logo} className="App-logo" alt="logo" />
                <p>
                  Edit <code>src/App.js</code> and save to reload.
                </p>
                <button
                  className="App-link"
                  onClick={this.myalert}
                >
                  dialog click
                </button>
              </header>
            </div>
        );
    }
}

export default App;